<template>
    <view class="page">
        <!-- 编辑 -->
        <view class="article-edit">
            <view class="edit" @click="isEdit = !isEdit">
                <text>{{isEdit?'完成':'编辑'}}</text>
            </view>
        </view>
        <!-- 文章列表 -->
        <view class="article-list">
            <view class="list" v-for="(item,index) in 6" :key="index">
                <view class="check" :style="isEdit?'display: flex':'display: none'">
                    <text class="iconfont icon-check"></text>
                </view>
                <view class="item">
                    <view class="title">
                        <text>华为新机为何如此强悍，自研发的能力是真的强，带领新的风尚！</text>
                    </view>
                    <view class="like">
                        <text>199人喜欢</text>
                    </view>
                </view>
                <view class="thumb">
                    <image :src="'/static/img/goods_thumb_'+(index+11)+'.png'" mode=""></image>
                </view>
            </view>
        </view>
        <!-- 底部 -->
        <view class="footer-btn" :style="isEdit?'display: flex':'display: none'">
            <view class="btn">取消收藏</view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            isEdit: false,
        };
    }
}
</script>

<style scoped lang="scss">
.page {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
}
/* 编辑 */
.article-edit {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10;
    /* #ifdef H5 */
    top: 88rpx;
    /* #endif */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 80rpx;
    background-color: #ffffff;
    .edit {
        width: 80rpx;
        height: 80rpx;
        text {
            font-size: 28rpx;
            color: #959595;
        }
    }
}
/* 文章列表 */
.article-list {
    padding: 0 4% 80rpx;
    margin-top: 88rpx;
    background-color: #ffffff;
    .list {
        display: flex;
        align-items: center;
        width: 100%;
        height: 200rpx;
        border-bottom: 2rpx solid #eeeeee;
        .check {
            display: flex;
            align-items: center;
            width: 60rpx;
            height: 100%;
            text {
                font-size: 34rpx;
                color: #c0c0c0;
            }
        }
        .item {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            width: 70%;
            height: 100%;
            .title {
                display: flex;
                align-items: center;
                width: 100%;
                height: 100rpx;
                text {
                    font-size: 28rpx;
                    color: #222222;
                }
            }
            .like {
                display: flex;
                align-items: center;
                justify-content: flex-end;
                width: 100%;
                height: 80rpx;
                text {
                    font-size: 24rpx;
                    color: #c0c0c0;
                }
            }
        }
        .thumb {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            width: 30%;
            height: 100%;
            image {
                width: 160rpx;
                height: 160rpx;
            }
        }
    }
}

/* 底部 */
.footer-btn {
    position: fixed;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80rpx;
    background-color: #ffffff;
    .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 90%;
        height: 70rpx;
        background: linear-gradient(to right, $base, $change-clor);
        border-radius: 70rpx;
        font-size: 28rpx;
        color: #ffffff;
    }
}
</style>
